Program Starter portable files and installed, programs and location?
It is quite easy to open files in a portable installation or installed with Windows 11, 10, ... programs in Q-Dir!

For example to allow to use 3rd party search, rename, directory backup and comparison, rename, ...  app! 

Content:
1.) ... Info about the program Starter in Q-Dir
2.) ... Further examples of the program Starter << WIn 10 Work Path Problem 



See also:> start Q-Dir with a parameter > synchronize directories in Q-Dir whit xcopy.exe!

Oh yes, if you hold down Ctrl, the programs will start in admin mode!
1.) Info about the program Starter in Q-Dir
associating Program StartsUse Quick links or Program-Run for this (screenshot 1+2).
Use the char "=" for splitting. For example Name=Path=Arguments

Starting with version 6.46, you can also define the working directory! Who needs it will know why!
Name=Path=Arguments=Work directory


Some example:
Relativ Path Example
Name1=../dir/program.xxx.exe=%curdir%
Name1=../dir/dir/program.xxx.exe=%all_files%
Drive of Q-Dir:
Name2=%drive%/dir/program.xxx.exe=%curdir%
......

Placeholder for Parameters:

%windir% for Windows Folder.
%sysdir% for System(32) Folder.
%sel_files% for Selected files.
%sel_files1% .... %sel_files4% for Selected files in view 1,2,3 or 4.
%all_files1% .... %all_files4% for all files in view 1,2,3 or 4.
%all_files% for all files.
%curdir% for Folder in active view.
%curdir1% .... %curdir4% for Folder in view 1,2,3 or 4.


Placeholder for locations and Work Directory:

%windir% for Windows Folder
%sysdir% for System(32) Folder
%desktop% for my Desktop
%appdat% for my Appdat
%personal% for my personal files

%drive% for curient Q-Dir.exe Drive
        (for example: "L:\" when Q-Dir locations L:\Programs\Q-Dir\Q-Dir.exe)

from 6.46
when run or open for example C:\XXX\fff.bat is:
%fdir% = C:\XXX

(Image-1) Q-Dir Paths and Folders!
implement a way of associating files on a portable installation with programs in the portable locations
-
^ Back to the top ^



2.) Further examples of the program Starter
Pretty interesting to make program starters like that (all portable freeware / open source tools):

the orange part and yellow is for the Windows 10 Work Directory Problem! Resolved via CMD or VBS!

Cmd=%sysdir%/cmd.exe

cmd(Admin)=A:\CMD\cmdAdmin.cmd=%curdir%

Content of cmdAdmin.cmd 

runAsAdmin cmd.exe "/K cd /d %1"


CompareText=A:\Tools\ExamDiff.exe=%sel_files%

CSV edit=A:\Tools\CSVed.exe=%sel_files%

Everything=A:\Tools\RunAsAdmin.vbs=A:\Tools\Everything.exe

Content of RunAsAdmin.vbs

' params: (1) command to execute (2) arguments (3) working directory
Set UAC = CreateObject("Shell.Application")
set ARGS=WScript.Arguments
EXECCMD=ARGS(0)
EXECARGS=""
EXECDIR=""
if ARGS.Count >1 then
EXECARGS=ARGS(1)
if ARGS.Count >2 then
EXECDIR=ARGS(2)
end if 
end if 
'Wscript.Echo "ARGS="&EXECARGS
'Wscript.Echo "DIR="&EXECDIR
'rem das mit dem dir funktioniert nicht wenn elevated wird (immer system32)
UAC.ShellExecute EXECCMD, EXECARGS, EXECDIR, "runas", 1



ExamDiff=A:\Tools\ExamDiff.exe=%sel_files%

FolderTimeUpdate=A:\Tools\foldertimeupdate.exe=/BaseFolder %sel_files% /scomma r:\FolderTimeUpdate.log

HexEdit=A:\Portable\hexedit XVI\XVI32.exe=%sel_files%

IdentifyFileType=A:\Tools\trid.exe=%sel_files% -w

JujuEdit=A:\Portable\JujuEdit\JujuEdit.exe=%sel_files%

MeinPlatz=A:\Tools\MeinPlatz.exe=%curdir%

ResHacker=A:\Tools\ExamDiff.exe=%sel_files%

TeracopyTo=A:\Tools\teracopy.exe=copy *A:\Tools\empty %curdir% 





FAQ 46: Updated on: 13 July 2021 07:49